﻿using System;
using Sustainalytics.ESGRatings.BusinessLogic.Models;

namespace Sustainalytics.EsgRatings.Service
{
    public class TaskLogsDto
    {
        public string Info { get; set; }
        public string Warnings { get; set; }
        public string Errors { get; set; }

        private TaskLogsDto() {}// prohibit public instantiation

        public static TaskLogsDto CreateComplete(TaskLogs taskLogs)
        {
            if (taskLogs == null)
            {
                throw new ArgumentNullException("taskLogs", "Task logs cannot be null.");
            }

            return new TaskLogsDto
            {
                Info = taskLogs.Info,
                Warnings = taskLogs.Warnings,
                Errors = taskLogs.Errors
            };
        }
    }
}
